home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / kn / elate / visual / waitvisual.c < prev   
Encoding:
C/C++ Source or Header  |  2001-05-12  |  765 b   |  45 lines

  1.  
  2. #include "tek/visual.h"
  3. #include "tek/kn/exec.h"
  4. #include "tek/kn/elate/visual.h"
  5.  
  6. #include <elate/taort.h>
  7. #include <elate/elate.h>
  8. #include <elate/ave.h>
  9.  
  10. #include <stdio.h>
  11.  
  12. /* 
  13. **    TEKlib
  14. **    (C) 1999-2001 TEK neoscientists
  15. **    all rights reserved.
  16. **
  17. **    TBOOL kn_waitvisual(TAPTR v, TKNOB *timer, TKNOB *evt)
  18. **
  19. */
  20.  
  21.  
  22.  
  23. TBOOL kn_waitvisual(TAPTR vis, TKNOB *timer, TKNOB *evt)
  24. {
  25.     struct visual_elate *v = (struct visual_elate *) vis;
  26.     TTIME delay = {0, 50000};
  27.  
  28.     if (v->evtpending)
  29.     {
  30.         return TTRUE;
  31.     }
  32.     
  33.     if (getevent(vis, &v->pendingevent, &v->pendingx, &v->pendingy, &v->pendingkeycooked, &v->pendingresize, &v->pendingbuttonstate))
  34.     {
  35.         v->evtpending = TTRUE;
  36.     }
  37.     
  38.     if (!v->evtpending)
  39.     {
  40.         kn_timedwaitevent(evt, timer, &delay);
  41.     }
  42.  
  43.     return v->evtpending;
  44. }
  45.